// miniprogram/pages/tabBar/home.js
import manba from '../../miniprogram_npm/manba/index.js'
Page({
  data: {
    list: []
  },

  onLoad: function (options) {
    this.gethome()
  },

  gethome() {
    wx.cloud.callFunction({
      name: 'read',
      data: {
        date: manba(new Date()).format('YYYY-MM-DD'),
        $url: 'readhome'
      }
    }).then((res) => {
      console.log(res)
      let list = res.result.data[0].data.content_list
      this.setData({
        list
      })
    })
  },
  onReady: function () {

  },

  onShow: function () {

  },

  onHide: function () {

  },

  onUnload: function () {

  },

  onPullDownRefresh: function () {

  },

  onReachBottom: function () {

  },

  onShareAppMessage: function () {

  },
  onShareTimeline() {
    
  }
})